<!-- eslint-disable vue/valid-v-for -->
<!-- eslint-disable vue/require-v-for-key -->
<template>
<fragment>
    <template v-for="i in list">
                <template v-if="i.children!=undefined&&i.children!=null&&i.children.length>0">

        <el-submenu :index="i.id+''">

              <template slot="title">
                <span>{{i.menuName}}</span>
              </template>

                <ListMenu :list="i.children"></ListMenu>

            </el-submenu>
            </template>
                <template v-else>
                <el-menu-item :index="i.menuPath" >
                <span>{{i.menuName}}</span>
              </el-menu-item>
                </template>
            </template>
</fragment>
</template>
<script>
export default {
  name: 'ListMenu',
  props: ['list']
}
</script>
